class Notifier < ActionMailer::Base
  
  # enviando información del evento por sms (siempre usaremos el movil)
  def event_info(user, event)
    destinations = user.class == User ? user.mobile : user
    recipients destinations
    from  "tvienes@gmail.com"
    subject "[tvienes] información de evento" 
    body :event => event
  end
  
  # enviando invitación del evento
  def event_invitation(contact, event, invitation)
    recipients contact
    from  "tvienes@gmail.com"
    subject "[tvienes] estás invitado a #{event.title}" 
    body :event => event, :invitation => invitation.code
  end
  
end
